home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10438 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.europeonline.com!usenet
  2. From: Dieter Schumacher <DSchumacher@europeonline.com>
  3. Newsgroups: comp.lang.c
  4. Subject: printing PostScript-Code under Windows
  5. Date: Sun, 17 Mar 1996 22:57:10 -0800
  6. Organization: Schumacher Edutainment
  7. Message-ID: <314D0946.55DA@europeonline.com>
  8. NNTP-Posting-Host: b3-12-6.xpool.europeonline.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (Win95; I; 16bit)
  13.  
  14. I wrote a Programm that writes PostScript-Code to the Print-Manager. 
  15. Everything works (he prints all pages the right way) but at the end of 
  16. every print-job the panel of the PS-printer shows an error or the 
  17. PS-printer prints an error-essage. In the end of the message, you will 
  18. find my (Delphi-)Code. Please help me? (Could you send me an E-mail. I do 
  19. not know if I know how to find you answer in the Newsgroups) Thank you 
  20. very much!
  21.  
  22.  TYPE
  23.   Daten = RECORD
  24.              ByteAnzahl: word;
  25.              Buf: array[1..10240] of Char;
  26.           end;
  27.  
  28.  
  29.  Open Device:
  30.  
  31.   hdcPrn := CreateDC(Driver, Device, Output, NIL);
  32.   StrPCopy(DocName,'Server');
  33.   Escape(hdcPrn, 10, 3, DocName, NIL)
  34.  
  35.  
  36.  Writing to Device:
  37.  
  38.   Escape(hdcPrn, PASSTHROUGH, 0, Daten, NIL)
  39.  
  40.  
  41.  Closing Device:
  42.  
  43.   Escape(hdcPrn, 11, 0, NIL, NIL);
  44.   DeleteDC(hdcPrn);
  45.  
  46.